import { isDev, getRequest, postRequest, directPostRequest } from '@/api';

const urlsObj = {};
if (isDev) {
  // 取得用户token
  urlsObj.goLogin = getRequest('login');
  // 取得用户信息
  urlsObj.getUserInfo = getRequest('userinfo');
  // 取得状态
  urlsObj.getStatus = getRequest('commonstatus');
  // 取得类别
  urlsObj.getTypes = getRequest('commontypes');
  // 取得仓库
  urlsObj.getStores = getRequest('commonstores');
  // 取得仓管员
  urlsObj.getStoreKeepers = getRequest('commonstorekeepers');
  // 新建仓库时获取仓管员
  urlsObj.getStoreAllKeepers = getRequest('commonstoreallkeepers');
  // 取得一级部门
  urlsObj.getOneLevelDept = getRequest('commononedept');
  // 取得二级部门
  urlsObj.getTwoLevelDept = getRequest('commontwodept');
  // 取得员工
  urlsObj.getEmployees = getRequest('commonemployees');
  // 取得非此角色员工
  urlsObj.getUnRoleEmployees = getRequest('commonemployees');
  // 取得供应商列表
  urlsObj.getSupplys = getRequest('commonsupplys');
  // 取得联系人列表
  urlsObj.getContacts = getRequest('commoncontacts');
  // 取得物料下拉选择列表
  urlsObj.getBasicConfigs = getRequest('commonbasicconfigs');
  // 取得供应商下拉选择列表
  urlsObj.getVendorBasicConfigs = getRequest('commonvendorconfigs');
  // 取得物料
  urlsObj.getMaterials = getRequest('commonmaterials');
  // 取得仓位
  urlsObj.getStorageSite = getRequest('commonstorage');
  // 取得路由
  urlsObj.getRoutes = getRequest('commonroutes');
} else {
  urlsObj.goLogin = directPostRequest('auth/token');
  urlsObj.getUserInfo = getRequest('employeeManager/empdetail/{username}');
  urlsObj.getStatus = getRequest('publicInterface/getStatusList/{orderType}');
  urlsObj.getTypes = getRequest('publicInterface/getTypeList/{orderType}');
  urlsObj.getStores = postRequest('publicInterface/getStoreHouseList');
  urlsObj.getStoreKeepers = postRequest('publicInterface/getKeeper');
  urlsObj.getStoreAllKeepers = getRequest('publicInterface/getAllKeeper');
  urlsObj.getOneLevelDept = getRequest('publicInterface/getDeptLevel1');
  urlsObj.getTwoLevelDept = getRequest('publicInterface/getDeptLevel2/{oneLevelDept}');
  urlsObj.getEmployees = postRequest('publicInterface/getEmployee');
  urlsObj.getUnRoleEmployees = getRequest('authGroup/emp/excludeRole/{roleId}');
  urlsObj.getSupplys = getRequest('publicInterface/getVendor');
  urlsObj.getContacts = getRequest('publicInterface/getContacts/{vendorId}');
  urlsObj.getBasicConfigs = getRequest('publicInterface/getBasicConfigs');
  urlsObj.getVendorBasicConfigs = getRequest('publicInterface/getVendorBasicConfigs');
  urlsObj.getMaterials = getRequest('publicInterface/getMateriel');
  urlsObj.getStorageSite = getRequest('publicInterface/getStorageSite/{storehouseId}');
  urlsObj.getRoutes = getRequest('authGroup/authRoles/{name}');
}

export default urlsObj;
